home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 January: Mac OS SDK / Dev.CD Jan 96 SDK / Dev.CD Jan 96 SDK2.toast / Development Kits (Disc 2) / QuickDraw™ 3D / Samples / SampleCode / VCDemo / Source / VCDemoMain.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-05-01  |  953 b   |  49 lines  |  [TEXT/MPS ]

  1. /*
  2.     VCDemoMain.c
  3.  
  4.     main function for VCDemo.
  5.  
  6.     ====================
  7.     A friendly reminder:
  8.  
  9.     The intent here is just to test and demo a QD3D Viewer client.
  10.  
  11.     This application performs virtually NO error checking.
  12.  
  13.     This application is not supported by anyone,
  14.     not even the author, who shall thankfully remain anonymous.
  15.  
  16.     DO NOT USE THIS CODE FOR ANYTHING OTHER THAN "GETTING THE GENERAL IDEA"!
  17.     ========================================================================
  18.  
  19.     © 1995 Apple Computer, Inc.
  20. */
  21. #include <QuickDraw.h>
  22. #include <Windows.h>
  23.  
  24. #include "EventLoop.h"
  25. #include "MenuDispatch.h"
  26.  
  27. WindowPtr        MainView;
  28.  
  29. extern void InitToolBox(short numberOfMasters);
  30. extern void MainEvent(void);
  31. extern void BuildMenuBars(void); 
  32. extern void ChooseFile(short item);
  33.  
  34. void main(void)
  35. {
  36.     InitToolBox(4);
  37.     
  38.     BuildMenuBars();
  39.     ChooseFile(cmdNew);
  40.     SetPort(MainView);
  41.     
  42.     while(!Done) {
  43.         MainEvent();
  44.         if(!FrontWindow()) 
  45.             MainView = nil;
  46.     }    
  47. }
  48.  
  49. /* EOF */